<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,minimum-scale=1,user-scalable=no">		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <link rel="stylesheet" type="text/css" href="/public/static/wx/css/base.css" />
    <link rel="stylesheet" type="text/css" href="/public/static/wx/font/font-awesome-4.7.0/css/font-awesome.css" />
    <link rel="stylesheet" type="text/css" href="/public/static/wx/plug-in/layui/css/layui.css" />
    <link rel="stylesheet" type="text/css" href="/public/static/wx/css/list-detail.css" />
    <script src="/public/static/wx/js/flex.js" type="text/javascript" charset="utf-8"></script>
    <title>任务信息</title>
    <style type="text/css">
        #layui-layer1{
            overflow: hidden;
        }

        .buttons a{
            width: 100%;
            height: 100%;
            color: #fff;
            display: inline-block;
        }
    </style>
</head>

<body>
<div class="index">
    <ul class="list">
        <li class="clearfix">
            <p class="title">标题</p>
            <p class="content">{$info.title}</p>
        </li>
        <li class="clearfix">
            <p class="title">电话</p>
            <p class="content">{$info.tel}</p>
        </li>
        <li class="clearfix">
            <p class="title">地址</p>
            <p class="content">{$info.address}</p>
        </li>
        <li class="clearfix area">
            <p class="title">故障类型</p>
            <p class="content">{$info.fault_name}</p>
        </li>
        <li class="clearfix">
            <p class="title">描述</p>
            <p class="content">{$info.desc}</p>
        </li>
        <li class="clearfix">
            <p class="title">附件</p>
            <p class="content">
                {if condition=" !empty($info.attach)"}
                <a href="{$info.attach}" style="color: #009E94;">附件1</a>
                {/if}
                {if condition=" !empty($info.w_attach)"}
                <a href="{$info.w_attach}" style="color: #009E94;">附件2</a>
                {/if}
            </p>
        </li>
        {if condition=" !empty($info.ticket)"}
            <li class="clearfix">
                <p class="title">工作票</p>
                <p class="content">
                    <?php $arr= explode(';',$info['ticket']); ?>
                    {foreach $arr as $k=>$vo}
                        {if condition=" !empty($vo)"}
                            <a href="{$vo}" target="_blank" style="color: blue">工作票{$k+1}</a>
                        {/if}
                    {/foreach}
                </p>
            </li>
        {/if}
        {if condition=" !empty($info.arge)"}
            <li class="clearfix">
                <p class="title">协议单</p>
                <p class="content">
                    <?php $arr= explode(';',$info['arge']); ?>
                    {foreach $arr as $k=>$vo}
                        {if condition=" !empty($vo)"}
                            <a href="{$vo}" target="_blank" style="color: blue">协议单{$k+1}</a>
                        {/if}
                    {/foreach}
                </p>
            </li>
        {/if}
        <li class="clearfix">
            <p class="title">创建时间</p>
            <p class="content">{$info.c_time}</p>
        </li>
        <li class="clearfix">
            <p class="title">状态</p>
            <p class="content">
                {if condition = "$info.state_id != 20"}
                    {if condition="empty($info.reg_name)"}
                        ({$info.name})
                    {else /}
                        ({$info.reg_name})
                    {/if}
                {/if}
                {$info.state_name}
            </p>
        </li>

        {if condition = "$info.state_id==23"}
        <li class="clearfix">
            <p class="title">拒单原因</p>
            <p class="content" style="color: red">{$info.reason}</p>
        </li>
        {/if}

    </ul>
   <!-- <ul class="buttons jiedan clearfix">
        <li class="refuse">选择工具</li>
        <li class="apply">工具列表</li>
        <li class="follow">跟踪状态</li>
    </ul>-->
    <ul class="buttons clearfix" style="display: flex;text-align: center;justify-content: center">

        {if condition="$info.state_id==20"}
            {if condition="$info.is_me==0"}
                <li class="add-follow"><a href="{:url('sendThirdUI')}?id={$info.id}">派单</a></li>
            {else /}
                <li class="add-follow"><a href="{:url('sendEnginUI')}?id={$info.id}">派单</a></li>
            {/if}
        {/if}

        {if condition="$info.state_id==23"}
            {if condition="$info.is_me==0"}
                <li class="add-follow"><a href="{:url('sendThirdUI')}?id={$info.id}">重新派单</a></li>
            {else /}
                <li class="add-follow"><a href="{:url('sendEnginUI')}?id={$info.id}">重新派单</a></li>
            {/if}
        {/if}


        <li class="follow"><a href="{:url('trackUI')}?id={$info.id}">查看跟踪</a></li>
    </ul>
</div>

<script src="/public/static/wx/js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/public/static/wx/plug-in/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
    var layer = layui.layer;
    $('.apply').on('click',function(){
        layer.open({
            type: 2,
            area: ['70%', '60%'],
            title: '可选工程师',
            content: 'choose-engineer.html',
            scrollbar:false,
            success: function(layero, index) {

            },
        });
    })
</script>
</body>

</html>